{% macro vote_form(document, source=None) -%}
  {% if not header %}
    {% set header = _('Was this article helpful?') %}
  {% endif %}
  {% if document.allows_vote(request) %}
    <div class="vote-bar">
      <header>{{ header }}</header>
      <form class="helpful" action="{{ url('wiki.document_vote', document_slug=document.slug) }}" method="post">
        <p>
          <input type="hidden" name="revision_id" value="{{ document.current_revision.id }}" />
          {% if source %}
            <input type="hidden" name="source" value="{{ source }}" />
          {% endif %}
          <div class="cf">
            <input type="submit" class="btn" name="helpful" value="{{ _('Yes') }}" />
            <input type="submit" class="btn" name="not-helpful" value="{{ _('No') }}" />
          </div>
          <img class="wait" src="{{ settings.STATIC_URL }}sumo/img/customercare/spinner.gif" alt="{{ _('Please wait...') }}" />
        </p>
      </form>
    </div>
  {% endif %}
{%- endmacro %}
